<?php
/* @var $this TicketController */
/* @var $model Ticket */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'ticket-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'ticket_name'); ?>
		<?php echo $form->textField($model,'ticket_name',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'ticket_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ticket_descript'); ?>
		<?php echo $form->textField($model,'ticket_descript',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'ticket_descript'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ticket_service_type'); ?>
		<?php echo $form->dropDownList($model,'ticket_service_type',array("IPL"=>"IPL", "DPL"=>"DPL", "CCTV"=>"CCTV", 			"WIFI"=>"WIFI", "DSL"=>"DSL", "IPVPN"=>"IPVPN", "IDA"=>"IDA") 
		
    	,array('empty'=>'Select a Service Type')); ?>

        <?php echo $form->error($model,'ticket_service_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'effective_date'); ?>
		<?php $this-> widget ('zii.widgets.jui.CJuiDatePicker', array(
		'model'=>$model, 'attribute'=>'effective_date',
			'options' => array (
			'dateFormat' => 'yy-mm-dd',
				'yearRange' => '-20:+20',
					'changeYear' => 'true',
						'changeMonth' => 'true',
					),
						));
					?>
		<?php echo $form->error($model,'effective_date'); ?>
	</div>

		<div class="row">
		<?php echo $form->labelEx($model,'demo_duration'); ?>
		<?php $this->widget('ext.timepicker1.timepicker',array(
              'name' => 'demo_duration',
              'model'=>$model,
             'language'=>'en',
                'options' =>array (
                   'timeFormat'=>'hh:mm:ss',
                 'showSecond'=>true,
                 'hourGrid'=>4,
               'minuteGrid'=>10,
			          'secondGrid'=>10,
			   
),
)); ?>
		<?php echo $form->error($model,'demo_duration'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'recommendation'); ?>
	<?php echo $form->textArea($model,'recommendation',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'recommendation'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'employee_id'); ?>
			<?php echo $form->dropDownList ($model, 'employee_id',
		CHtml::listData(Employee::model()->findAll(),'id','FullNameEmployee'),
		array('prompt' => 'Select Employee')
		); ?>
		<?php echo $form->error($model,'employee_id'); ?>
	</div>

	
        <div class="row">
                <?php echo $form->labelEx($model,'customer_business_id'); ?>
                        <?php echo $form->dropDownList ($model, 'customer_business_id',
                CHtml::listData(
                CustomerBusiness::model()->findAll(),'id','FullNameCustomer'),
                array('prompt' => 'Select Customer')
                ); ?>
                <?php echo $form->error($model,'customer_business_id'); ?>
        </div>

        <div class="row">
                <?php echo $form->labelEx($model,'customer_resident_id'); ?>
                <?php echo $form->dropDownList ($model, 'customer_resident_id',
                CHtml::listData(
                CustomerResident::model()->findAll(),'id','FullNameResident'),
                array('prompt' => 'Select Customer')
                ); ?>
                <?php echo $form->error($model,'customer_resident_id'); ?>
        </div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
